package com.example.result.model

import com.google.gson.Gson
import org.junit.Test

class DaodejingTest {
    @Test
    fun testNetWork() {
//        val data = ZhouyiApi.create(HttpUrl.parse("1")!!).getData(1).execute().body()
//        print(data)
        val a = Gson().fromJson<com.lly.tboc.zhouyi.vo.GuaDatas>(
            """
            {
              "count": 1,
              "hasNext": 0,
              "data": [
                {
                  "name": "乾",
                  "id": 1,
                  "xiang": "天行健 君子以自强不息",
                  "wu": "易知",
                  "data": [
                    {
                      "id": 1,
                      "name": "初九",
                      "ci": "潜龙勿用",
                      "xiang": null,
                      "wu": null
                    },
                    {
                      "id": 2,
                      "name": "九二",
                      "ci": "见龙在田 利见大人",
                      "xiang": null,
                      "wu": null
                    }
                  ]
                }
              ]
            }
        """.trimIndent(), com.lly.tboc.zhouyi.vo.GuaDatas::class.java
        )
        print("--\n" + a.data[0].data)
    }
}